package com.ldcc.report_system.util;

import android.view.Gravity;
import android.widget.Toast;

import com.ldcc.report_system.ReportApplication;

/***
 * @author wwj[yeshengkele@outlook.com]
 * @description 提醒消息工具类
 */
public class AlertUtil {

    /**
     * 全局长时间提醒
     *
     * @param msg 消息
     */
    public static void longTime(String msg) {
        Toast toast = Toast.makeText(ReportApplication.getContext(), msg, Toast.LENGTH_LONG);
        toast.setGravity(Gravity.CENTER, 0, 0);
        toast.show();
    }

    /**
     * 全局短时间提醒
     *
     * @param msg 消息
     */
    public static void shortTime(String msg) {
        Toast toast = Toast.makeText(ReportApplication.getContext(), msg, Toast.LENGTH_SHORT);
        toast.setGravity(Gravity.CENTER, 0, 0);
        toast.show();
    }

}
